package com.kktest.kk01.controller;

import com.kktest.kk01.producer.MsgProducer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: wenkang.li
 * @Date: 2021/1/22 11:08
 * @Description:
 */
@RestController
public class RebbitMQController {

    @Autowired
    MsgProducer msgProducer;

    @GetMapping("/msgsend")
    String rabbitMqSender(){
        String sender="this is a msg...";
        msgProducer.sendMsg(sender);
        return "success";
    }
}
